
freeswitch.consoleLog('info',"unhold.lua \n")
 event_json = event:serialize()

 freeswitch.consoleLog("info","event:"..event_json .."\n")

uuid = event:getHeader("Unique-ID")
 freeswitch.consoleLog("info","uuid:"..uuid .."\n")

 o_uuid = event:getHeader("Other-Leg-Unique-ID")
 freeswitch.consoleLog("info","Other-Leg-Unique-ID:"..o_uuid .."\n")

 channel_call_uuid = event:getHeader("Channel-Call-UUID")
 freeswitch.consoleLog("info","Channel-Call-UUID:"..channel_call_uuid .."\n")

 channel_name = event:getHeader("Channel-Name")
 freeswitch.consoleLog("info","channel_name:"..channel_name .."\n")

 endpoint_disposition = event:getHeader("variable_endpoint_disposition")

 bridged_uuid = uuid;
if channel_call_uuid == uuid then
	bridged_uuid = o_uuid
end

-- executeAsync
api = freeswitch.API();
if endpoint_disposition == 'BLIND_TRANSFER' then
	origination_uuid = api:executeString("create_uuid")	
	api:executeString("uuid_setvar "..o_uuid.." other_leg_origination_uuid "..origination_uuid);
	freeswitch.consoleLog("info","other_leg_origination_uuid:"..origination_uuid.."\n")
	freeswitch.consoleLog("info","BLIND_TRANSFER！".."\n")	
else
	reply = api:executeString("uuid_bridge "..channel_call_uuid.." "..bridged_uuid);

	if reply ~= nil then
		freeswitch.consoleLog("info","replay: "..reply.."\n")
	else
		freeswitch.consoleLog("info","replay is nil \n")
	end
end
